/*
 * @Author: January
 * @Date: 2022-01-04 09:44:29
 */
#ifndef __CIPHER_MODE_H__
#define __CIPHER_MODE_H__


typedef void(*_block_cipher)(void* ctx, const u8* in, u8* out);
void cbc_encrypt(u8* nonce, int block_size, void* cipher_ctx, _block_cipher cipher_enc,  const uint8_t* in, int in_len,uint8_t* out);
void cbc_decrypt(u8* nonce, int block_size, void* cipher_ctx, _block_cipher cipher_dec,  const uint8_t* in, int in_len,uint8_t* out);
void ctr_process(u8* nonce, int block_size, void* cipher_ctx, _block_cipher cipher_enc, const uint8_t* in, int in_len,uint8_t* out);

#endif /* cipher_mode.h */